package com.gable.exhibition.service;

import com.gable.common.util.ReturnResultUtil;
import com.gable.exhibition.model.Maintainer;
import com.gable.exhibition.model.User;
import com.gable.exhibition.view.ImportExcelMaintainerModel;
import com.gable.exhibition.view.MaintainerView;

import java.util.List;

/**
 * Created by Lesson on 2018/2/9.
 */
public interface MaintainerService {

    /**
     * 获取维修商列表
     * @param maintainerView
     * @Create date 2018/2/9
     * @Create user jacky
     * @return
     */
    ReturnResultUtil queryMaintainerList(MaintainerView maintainerView);


    /**
     * 添加或者修改维修商信息
     * @param maintainerView
     * @Create date 2018/2/9
     * @Create user jacky
     * @return
     */
    ReturnResultUtil addOrUpdateMaintainer(MaintainerView maintainerView);

    /**
     * 获取维修商详情
     * @param maintainerId
     * @Create date 2018/2/13
     * @Create user jacky
     * @return
     */
    ReturnResultUtil queryMaintainerInfo(Long maintainerId);

    /**
     * 保存导入的维修商信息
     * @param list
     * @param user
     * @Create user jacky
     * @Create date 2018/2/23
     * @return
     */
    ReturnResultUtil saveMaintainerByExcel(List<ImportExcelMaintainerModel> list, User user);


    /**
     * 根据厂商id获取该厂家下的所有维修商
     * @param manufacturerId
     * @Create user jacky
     * @Create date 2018/2/26
     * @return
     */
    ReturnResultUtil queryMaintainerListByManuId(Long manufacturerId);

    /**
     * 厂商添加维修商信息
     * @param maintainerView
     * @Create user jacky
     * @Create date 2018/3/8
     * @return
     */
    ReturnResultUtil addMaintainerByManuId(MaintainerView maintainerView);

    /**
     * 禁用维修商
     * @param maintainer
     * @Create user jacky
     * @Create date 2018/3/8
     * @return
     */
    ReturnResultUtil detainMaintainerByManuId(Maintainer maintainer);

    ReturnResultUtil queryMaintainerByName(MaintainerView maintainerView);


    /**
     * 根据服务商名字判断当前维修商是否存在。如果存在返回主键id，不存在则添加一条，并返回主键id
     * @param maintainer
     * @Create date 2018/3/23
     * @Create user jacky
     * @return
     */
    Long checkMaintainer(Maintainer maintainer);
}
